package BiShi.first;


import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()) {
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] a = new int[n];
            int sum = 0;
            for(int i = 0; i < n; i++){
                a[i] = sc.nextInt();
                sum+=a[i];
            }

            int ans = 0;
            int times = m/sum;
            int rest = m%sum;
            ans = times*a.length;

            for(int i = 0; i < n; i++){
                if(rest-a[i]>=0){
                    ans++;
                    rest = rest - a[i];
                }
                if(rest<0){
                    break;
                }
            }
            System.out.println(ans);

        }
    }


}



